﻿// ActionScript file
/**
 * 组件边缘�?用于边缘定位
 */
package org.nickro.geom{
	public class EdgeMetrics{
		public var left:Number;
		public var top:Number;
		public var right:Number;
		public var bottom:Number;
		public function EdgeMetrics(left:Number=0,
									top:Number=0,
									right:Number=0,
									bottom:Number=0){
			this.left=left;
			this.top=top;
			this.right=right;
			this.bottom=bottom;	
		}
		
		public function clone():EdgeMetrics{
			return new EdgeMetrics(left,top,right,bottom);
		}
		
		public function equals(e:EdgeMetrics):Boolean{
			if(e.left != this.left) return false;
			if(e.right != this.right) return false;
			if(e.top != this.top) return false;
			if(e.bottom != this.bottom) return false;
			
			return true;
		}
		
		public function toString():String{
			var result:String= "EdgeMetrics :";
			result += "left:" + left;
			result += "top:" + top;
			result += "right:" + right;
			result += "bottom:" + bottom;
			return result;
		}
	}
}